import axios from "axios";
const http = axios.create({
    baseURL: "http://pcapi-xiaotuxian-front-devtest.itheima.net",
    // timeout: 5000,
    headers:{
        Authorization:"Bearer "+JSON.parse(localStorage.getItem("token"))
    }
})
// 请求拦截器
http.interceptors.request.use(config => {
    return config
}, e => Promise.reject(e));
// 请求拦截器
http.interceptors.response.use(res => res.data, e => {
    return Promise.reject(e);
})
export {
    http
}